﻿using STHPMS1.DAL.D_Core;
using System.Data;
using ServiceStack.OrmLite;
using STHPMS1.ICore.I_Entity.Stmpms1;
using STHPMS1.Common.C_Entity.Stmpms1;
using STHPMS1.ICore.I_DAL.Repository;
using System.Collections.Generic;
namespace STHPMS1.DAL.D_Repository
{
    public class Dp_Sejud_CalcuRepository : DalBase, IDp_Sejud_CalcuRepository
    {

        /// <summary>
        /// 计算评判系数：复选措施评判系数计算表
        /// </summary>
        /// <param name="rdwayid">路线编号</param>
        /// <param name="measini">复选措施</param>
        /// <returns></returns>
        public double GetJUDGE_COEF(string rdwayid, string measini)
        {
            IDbConnection conn = Adapter.OpenDbConnection();
            return conn.Scalar<double>("select sum(WEIGHT_COE*VALUE)/100 from DP_SEJUD_CALCU where RDWAYID='" + rdwayid + "' and SECON_MEASURE='" + measini + "'");
        }
    }
}
